<%--
  Created by IntelliJ IDEA.
  User: Yzk20
  Date: 2025/6/24
  Time: 9:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../public.jsp"%>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="css/styless.css">
</head>
<body>
<form action="<%=pageContext.getServletContext().getContextPath()%>/readerServlet">
<%
  String readerid = request.getParameter("readerid");//读者ID

  String sql = "select * from readers t where t.readerid= '"+readerid+"'";
  Statement stmt = conn.createStatement();
  ResultSet rs = stmt.executeQuery(sql);
  String readername=null;
  String sex=null;
  String idcard=null;
  String xh=null;
  String phone=null;

  while (rs.next()){
      readername =rs.getString("readername");
      sex =rs.getString("sex");
      idcard =rs.getString("idcard");
      xh =rs.getString("xh");
      phone =rs.getString("phone");
  }

%>

<table align="center" width="50%" >
    <tr>
        <td><input type="hidden"  name="actionType"  value="reader_update"></td>
        <td><input type="hidden"  name="readerid"  id="readerid" value="<%=readerid%>"></td>
    </tr>
    <tr>
        <td>借阅人：<input type="text" name="readername" id="readername" value="<%=readername%>"></td>
    </tr>
    <tr>
        <td>性别：<input type="text" name="sex" id="sex" value="<%=sex%>" ></td>
    </tr>
    <tr>
        <td>身份证号
            <input type="text" name="idcard"  id="idcard" value="<%=idcard%>"></td>
    </tr>
    <tr>
        <td>学号
            <input type="text" name="xh" id="xh" value="<%=xh%>"></td>
    </tr>
    <tr>
        <td>联系方式
        <input type="text" name="phone" id="phone" value="<%=phone%>"></td>
    </tr>
    <tr>
        <td colspan="2 " onclick="">
            <input type="submit" value="提交">
        </td>
    </tr>
</table>
</form>
</body>
</html>